﻿<?php
header('Content-Type: text/html; charset=utf-8');
session_start();
$error = false;
if (isset($_SESSION['login'])) {
    $error = false;
    header("Location:principal.php");
} else {
    if (isset($_GET['error']) && ($_GET['error'] == "1")) {
        $error = true;
    }
}
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="pt_BR" lang="pt_BR">
    <head>
        <meta http-equiv='Content-Type' content='text/html; charset=utf-8'/>
        <title>Orientação Acadêmica DCC</title>
        <link rel="stylesheet" type="text/css" href="css/demo.css" />

        <link rel="stylesheet" type="text/css" href="css/animate-custom.css" />
        <link rel="stylesheet" type="text/css" href="css/style3.css" />
        <link rel="stylesheet" href="css/jquery-ui-1.10.3.custom.min.css" />
        <script type="text/javascript" src="js/jquery.js"></script>
        <script type="text/javascript" src="js/jquery-ui-1.10.0.custom.min.js"></script>
        <script type="text/javascript" src="js/script.js?stsid=<?php echo rand() * rand(); ?>"></script>
    </head>
    <body style="background: #fff url(img/back.png) repeat top left;">
        <div class="container">
            <!-- Codrops top bar -->
            <div class="codrops-top">
                <a >
                    <strong>&laquo; UNIVERSIDADE FEDERAL </strong>DA BAHIA
                </a>
                <div class="clr"></div>
            </div><!--/ Codrops top bar -->
            <header>
                <h1>Orienta&ccedil;&atilde;o<span>&nbsp;Acad&ecirc;mica </span></h1>
            </header>
            <section>				
                <div id="container_demo" >
                    <div id="wrapper">
                        <div  class="animate form"> 
                            <form id='login' action='login.php' method='post' accept-charset='UTF-8'> 
                                 <h1></h1>
                                <p> 
                                    <label for="username" class="uname"> Seu email </label>
                                    <input id='username' name='email' required type='text' placeholder="meuemail@email.com"/>
                                </p>
                                <p> 
                                    <label for="password" class="youpasswd"> Sua senha </label>
                                    <input id='password' name='senha' required type='password' placeholder="ex. X8df!90EO" /> 
                                </p>
                                 <div align="center" style="font:14px Verdana;text-decoration:underline;color:red;display:<?php echo $error ? "block" : "none"; ?>">E-mail/senha inválidos!</div>
                                <p class="login button"> 
                                    <input type='submit' name='Submit' value='Acessar' /> 
                                </p>
                                 <img style="padding-left: 175px; padding-top: 20px;" src="img/ufba.png" height="150px" width="100px"></img>
                                <p class="change_link">
                                </p>
                            </form>
                        </div>
                    </div>
                </div>  
            </section>
        </div>
    </body>
</html>